<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="password" name="password">
		<span class="msg"></span>
		<script type="text/javascript">
			//作业是：根据输入框输入的密码的长度，来判断并输出密码强度的评价,如果少于6位就是密码太弱
			// 6-10位之间就是密码强度中等 ,超过10位就是密码无敌
			let psw = document.querySelector('input')
			let span = document.querySelector('.msg')
			console.log(psw,span);
			// 键盘事件:keyup ,keydown ,click
			// psw.addEventListener('mousemove',function(){})
			psw.onkeyup = function (){
				if(psw.value.length<6){
					span.innerHTML = '密码太弱！！'
				}else if(psw.value.length>10 ){
					span.innerHTML = '密码无敌！'
				}else {
					span.innerHTML = '密码中等'
				}
					
			}
		</script>
	</body>
</html>
